﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hydrogen.MathExt.Expression.Functions
{
    internal class FunctionMin:FunctionBase
    {
        public override double Evaluate(params double[] args)
        {
            if (args == null || args.Length == 0) return 0;
            double min = double.MaxValue;
            foreach (var item in args)
            {
                if (item < min) min = item;
            }

            return min;
        }
    }
}
